program OD;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a, b, c, i, j, n:integer;

begin
  readln(a);
  readln(b);
  readln(c);
  if (a>=b) and (a>=c) then
  for i:=1 to a do
  begin
     if (a mod i=0) and (b mod i=0) and (c mod i=0) then
     write(i, ' ');
  end;
  if (c>=b) and (c>=a) then
  for i:=1 to b do
  begin
     if (a mod i=0) and (b mod i=0) and (c mod i=0) then
     write(i, ' ');
  end;
  if (b>=a) and (b>=c) then
  for i:=1 to c do
  begin
     if (a mod i=0) and (b mod i=0) and (c mod i=0) then
     write(i, ' ');
  end;
  writeln;
  readln;
end.
